package com.yyk.yykywd.mvvm.view_model

import androidx.lifecycle.MutableLiveData
import com.yyk.yykywd.mvvm.entity.HomeBean
import com.yyk.yykywd.mvvm.entity.WorkNumBean
import com.yyk.yykywd.mvvm.model.WorkModel

/**
 * 文件描述：
 * Created by guo on 2019-11-28.
 */
class NewWorkViewModel:BaseViewModel() {
    private val workModel = WorkModel()

    //LiveData,使该数据可以被感知
    var workNum = MutableLiveData<WorkNumBean>()

    fun getNum() {
        workModel.getWorkList(object :WorkModel.GetWork{
            override fun getInfo(info: WorkNumBean) {
                workNum.value = info
            }

            override fun onError(e: String) {
            }

        })
    }
}